home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-12 | 3.6 KB | 104 lines | [TEXT/KAHL] |
- ReadME first!!
-
- Ok, what is this stuff?
-
- Years ago, I was a mainframe programmer - got tired of Cobol and switched to
- database & 4th generation languages. After I tired of that, I started
- programming on the Mac. I had to teach myself both the Macintosh Toolbox and
- "C" at the same time. One of my primary sources for programming instruction
- was other people's code - I constantly cruised the forums on Compuserve and
- Genie and downloaded anything that said "source" in the description.
-
- This is a small gift in return. Hopefully, someone, somewhere will learn
- something from this collection of odds and ends.
-
- Accompanying this note, you should find:
-
- 1. A collection of code resources. Just paste them into the .rsrc files
- for your programming projects and use them.
-
- For many details about the CDEF's, how to use them and some programming tips;
- read the "About CDEF's" file.
-
- 2. A sample of source that demonstrates how to write a simple CDEF. See the
- items with "cdef3D" in their name. This is the source for the 3D Button CDEF.
-
- 2. A demo program project to show the use of the CDEF's.
-
- 3. Some utility routines to assist in writing dialog routines.
- They are:
-
- - dialogAssist.c
- - dimText.c
- - movableModal.c
- - panelAssist.c
- - TogLib.c
-
- and matching header files.
-
- All of the source & projects are Think C 6.0.1.
-
- Here is what the utility routines do - the code is fairly well commented, so
- study the code itself.
-
- dialogAssist.c/.h
- -----------------
- I simply got tired of writing pairs of GetDItem()/SetDItem() and similar calls.
- This file is a collection of routines that make one call replacements for
- handling controls, keys or the mouse in dialogs.
-
- Also, there are some utility routines to do some special dialog handling - like
- limiting input length, numeric input, checking for command or option keys or a
- "exit" key (enter or escape).
-
- There are lots of handy routines in this file, study it to see if there is
- anything you can use.
-
- dimText.c/.h
- ------------
-
- These routines were written by JWWalker. They are used by some of the dialogAssist
- routines.
-
- To use these routines, do the following:
-
- 1. Create your dialog.
- 2. Call initDimText(yourDialogPtr) before calling ModalDialog.
- 3. Call daDimOne() to dim a text item (edit or static).
- 4. Just before calling DisposDialog(), call disposeDimText().
-
- Note that if you use AppendDITL or ShortDITL (as in the tab Panel demo), there
- are extra calls to be used. See cdefDemo.c for an example.
-
- movableModal.c/.h
- -----------------
- A set of routines to assist in implementing "Movable Modal" dialogs. Simply
- substitute a call to "ModalDialog" with a call to "movableModal" dialog. Two
- cautions:
-
- 1. Use the proper window definition in your dialog resource.
- 2. You must have a routine called updateWindow(WindowPtr w) in your code - even
- if it just a dummy. Or, change the source to point to the name of your update
- routine.
-
- panelAssist.c/.h
- ----------------
- Two routine to help in implementing tabPanel dialogs. See the file "About CDEF's".
-
- TogLib.c/.h
- -----------
- Routines to assist in handling "Tog" buttons. See the file "About CDEF's".
-
- -------------------------------------------------------------------------------
-
- The source & executable code may be freely redistributed as long as all of the
- original package is included AND no specific charge is made for the package.
-
- The dimText.c/.h files are written by JWWalker.
-
- The CDEF's or other code in this package may be incorporated in any freeware,
- shareware, commercial or other software package.
-
- -------------------------------------------------------------------------------
- Jim Stout - August 1994
-